<template>
  <div>
    <form action="/">
      <van-icon class="icon" name="arrow-left" @click="$router.go(-1)"/>
      <van-search
        v-model="value"
        show-action
        placeholder="请输入搜索关键词"
        @search="onSearch"
        @cancel="onCancel"
      />
    </form>

    <div class="content">
      <div class="title">
        <h3>搜索历史</h3>
        <van-icon name="delete-o" />
      </div>
      <div class="list"></div>
    </div>
  </div>
</template>
  
  <script>
export default {
  data() {
    return {
      value: "",
    };
  },
  methods: {
    onSearch(val) {
      Toast(val);
    },
    onCancel() {
      Toast("取消");
    },
  },
};
</script>
  
  <style scoped lang="scss">
form {
  width: 100%;
  display: flex;
  align-items: center;
  ::v-deep .van-search {
    width: 100%;
    padding-left: 1rem;
  }
  .icon {
    font-size: 0.48rem;
    position: absolute;
    vertical-align: middle;
    padding-left: 0.215rem;
  }
}
.content {
  font-size: 12px;
  .title {
    width: 95%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}
</style>